package com.lxmes.business.service.impl;

import java.util.List;
import com.lxmes.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lxmes.business.mapper.CcQualityAttributeMapper;
import com.lxmes.business.domain.CcQualityAttribute;
import com.lxmes.business.service.ICcQualityAttributeService;

/**
 * 质量属性表Service业务层处理
 * 
 * @author 张志煜
 * @date 2022-11-28
 */
@Service
public class CcQualityAttributeServiceImpl implements ICcQualityAttributeService 
{
    @Autowired
    private CcQualityAttributeMapper ccQualityAttributeMapper;

    /**
     * 查询质量属性表
     * 
     * @param id 质量属性表主键
     * @return 质量属性表
     */
    @Override
    public CcQualityAttribute selectCcQualityAttributeById(Long id)
    {
        return ccQualityAttributeMapper.selectCcQualityAttributeById(id);
    }

    /**
     * 查询质量属性表列表
     * 
     * @param ccQualityAttribute 质量属性表
     * @return 质量属性表
     */
    @Override
    public List<CcQualityAttribute> selectCcQualityAttributeList(CcQualityAttribute ccQualityAttribute)
    {
        return ccQualityAttributeMapper.selectCcQualityAttributeList(ccQualityAttribute);
    }

    /**
     * 新增质量属性表
     * 
     * @param ccQualityAttribute 质量属性表
     * @return 结果
     */
    @Override
    public int insertCcQualityAttribute(CcQualityAttribute ccQualityAttribute)
    {
        ccQualityAttribute.setCreateTime(DateUtils.getNowDate());
        return ccQualityAttributeMapper.insertCcQualityAttribute(ccQualityAttribute);
    }

    /**
     * 修改质量属性表
     * 
     * @param ccQualityAttribute 质量属性表
     * @return 结果
     */
    @Override
    public int updateCcQualityAttribute(CcQualityAttribute ccQualityAttribute)
    {
        ccQualityAttribute.setUpdateTime(DateUtils.getNowDate());
        return ccQualityAttributeMapper.updateCcQualityAttribute(ccQualityAttribute);
    }

    /**
     * 批量删除质量属性表
     * 
     * @param ids 需要删除的质量属性表主键
     * @return 结果
     */
    @Override
    public int deleteCcQualityAttributeByIds(Long[] ids)
    {
        return ccQualityAttributeMapper.deleteCcQualityAttributeByIds(ids);
    }

    /**
     * 删除质量属性表信息
     * 
     * @param id 质量属性表主键
     * @return 结果
     */
    @Override
    public int deleteCcQualityAttributeById(Long id)
    {
        return ccQualityAttributeMapper.deleteCcQualityAttributeById(id);
    }
}
